package com.example.myapplication.slice;

import com.example.myapplication.ResourceTable;
import com.example.myapplication.slice.slice.slice.OrderAddAbilitySlice;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.aafwk.content.Operation;
import ohos.agp.components.Button;
import ohos.agp.components.Component;
import ohos.agp.components.PageSlider;

public class picturePageAbilitySlice extends AbilitySlice implements Component.FocusChangedListener{

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_picture_ability_main1);

    }

    /**初始化选择图片列表*/
    private void initPicture(PageSlider pageSlider){
        //绑定添加图片按钮的点击事件
        Button btn =(Button) pageSlider.findComponentById(ResourceTable.Id_search_item);
        btn.setClickedListener(component -> {
            Intent intent = new Intent();
            present(new OrderAddAbilitySlice(),intent);
        });
    }
    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }



    @Override
    public void onFocusChange(Component component, boolean b) {

    }
}
